extends Area2D



enum State{
	UNPICKED,
	PICKED
}

var state = State.UNPICKED
var player = null
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	$Sprite2D.modulate = Color(2.0,2.0,2.0,2.0)

func _process(delta: float) -> void:
	if is_instance_valid(player) && state == State.PICKED:
		self.global_position = player.global_position

func _on_body_entered(body: Node2D) -> void:
	if body is Player && state == State.UNPICKED:
		state = State.PICKED
		player = body


func _on_area_entered(area: Area2D) -> void:
	pass # Replace with function body.
